package com.zjj.learn.designmodel.work.strategy;

public class Question {

    private final Answer answer;

    /**
     * 在对象实例化是就需要提供解决方案
     **/
    public Question(Answer answer) {
        this.answer = answer;
    }

    public void answer(){
        System.out.println("解决问题了...");
        this.answer.slove();
    }
}
